<?php
session_start();
if(!$_SESSION['admin'] || !$_SESSION['prob_privilege']) {
	echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	echo '<script type="text/javascript">alert("您还没有登录或权限不够……");</script>';
	echo '<script type="text/javascript">window.location = "../index.php";</script>';
}
//ini_set("display_errors", 1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!--[if IE]><script type="text/javascript">window.location = "../ie.php";</script><![endif]-->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>NDSOJ - 管理 - 添加题目</title>
	<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<h1>欢迎您，辛勤的管理员！</h1>
<h2>添加题目</h2>
<p><a href="index.php">返回管理首页</a></p>
<form action="problem_adding.php" method="post">
	<p><label for="name">题目名称</label>
	<input name="name" id="name" type="text" size="40" value="必填" /></p>
	<p><label for="filename">文件名称</label>
	<input name="filename" id="filename" type="text" size="40" value="必填" /></p>
	<p><label for="provider">提供题目</label>
	<input name="provider" id="provider" type="text" size="40" value="必填" /></p>
	<!--
	type
	source
	source_minor
	difficulty
	ac_times
	submit_times
	
	. test_points
	. time_limit
	. memory_limit
	-->
	<p><label for="background">题目背景</label>
	<textarea name="background" id="background" rows="6" cols="64"></textarea></p>
	<p><label for="description">问题描述</label>
	<textarea name="description" id="description" rows="6" cols="64"><p>必填</p></textarea></p>
	<p><label for="input">输入文件</label>
	<textarea name="input" id="input" rows="6" cols="64"><p>必填</p></textarea></p>
	<p><label for="output">输出文件</label>
	<textarea name="output" id="output" rows="6" cols="64"><p>必填</p></textarea></p>
	<p><label for="sample_input">样例输入</label>
	<textarea name="sample_input" id="sample_input" rows="6" cols="64">必填</textarea></p>
	<p><label for="sample_output">样例输出</label>
	<textarea name="sample_output" id="sample_output" rows="6" cols="64">必填</textarea></p>
	<p><label for="sample_hint">样例说明</label>
	<textarea name="sample_hint" id="sample_hint" rows="6" cols="64"></textarea></p>
	<p><label for="hint">注释<br /></label>
	<textarea name="hint" id="hint" rows="6" cols="64"></textarea></p>
	<p><button type="submit">添加</button></p>
</form>
</body>
</html>
